# -*- coding : utf-8 -*-
# @Time      : 2020/6/28 9:43
# @Author    : 刘紫豫
# @email     : ziyu.liu@i9i8.com
# @FileName  : handleyaml.py
# @Software  : PyCharm
import os
import yaml
from config.config import DATA_DIR
from library.logger import log


def read_yml(filename):
    with open(os.path.join(DATA_DIR, filename), encoding='utf-8') as fs:
        data = yaml.load(fs, Loader=yaml.FullLoader)
        log.info(f"读取到测试文件<{filename}>数据：\n{data}")
    return data
